from selenium.webdriver.common.by import By

from cloud_po.pages.base_page import BasePage
from cloud_po.utils.log_utils import logger


class OrderEntryPage(BasePage):

    __MANUAL_CREATE_BTN = (By.XPATH, "//p[text()='手动创建']/..")

    def click_manual_create(self):
        logger.info("点击手动创建")
        self.do_find(self.__MANUAL_CREATE_BTN).click()
        from cloud_po.pages.order_add_page import OrderAddPage
        return OrderAddPage(self.driver)

